package com.kerrykidz.system.util.createWord;

import java.beans.IntrospectionException;
import java.lang.reflect.InvocationTargetException;
import java.util.Map;

import com.kerrykidz.system.util.createWord.model.MMHeTongwordModel;
import com.kerrykidz.system.util.createWord.model.ParHetongWordModel;

public class CreateWD2003Util {
	
	/**
	 * 
	  * @Title: createParHetongWord
	  * @Description: TODO(生成预约合同word )
	  * @param ParHetongWordModel
	  * @return String 返回路径地址
	 * @throws InvocationTargetException 
	 * @throws IllegalAccessException 
	 * @throws IntrospectionException 
	 */
	@SuppressWarnings("unchecked")
	public static String createParHetongWord(ParHetongWordModel parHetong) throws IntrospectionException, IllegalAccessException, InvocationTargetException{
		if(parHetong != null){
			Map beanMap = ConvertUtil.convertBean2Map(parHetong);
					String parFileUrl =CreateWd2003.createWord2003(beanMap, parHetong.getFileNameType(),false);
					return parFileUrl;
		}
		return null;
	}
	
	/**
	 * 
	  * @Title: createParHetongWord
	  * @Description: TODO(生成会员合同word )
	  * @param ParHetongWordModel
	  * @return String 返回路径地址
	 * @throws InvocationTargetException 
	 * @throws IllegalAccessException 
	 * @throws IntrospectionException 
	 */
	@SuppressWarnings("unchecked")
	public static String createMemberWord(MMHeTongwordModel mmHetong) throws IntrospectionException, IllegalAccessException, InvocationTargetException{
		if(mmHetong != null){
			Map beanMap = ConvertUtil.convertBean2Map(mmHetong);
					String parFileUrl =CreateWd2003.createMmHetongWord2003(beanMap,"",false);
					return parFileUrl;
		}
		return null;
	}
	 
}
